package com.hxgz.steel.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@ApiModel("订单子表对象模型")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderItem {
    private Long id;

    @ApiModelProperty("订单id")
    private Long orderId;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("商品id")
    private Long productId;


    @ApiModelProperty("型号")
    private String type;

    @ApiModelProperty("颜色")
    private String color;

    @ApiModelProperty("分类名称")
    private String categoryName;
    @ApiModelProperty("品名")
    private String topName;
    @ApiModelProperty("材质")
    private String materials;
    @ApiModelProperty("特性")
    private String features;
    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品图片地址")
    private String productImage;

    @ApiModelProperty("生成订单时的商品单价，单位是元,保留两位小数")
    private BigDecimal currentUnitPrice;

    @ApiModelProperty("商品数量")
    private Integer quantity;

    @ApiModelProperty("商品总价,单位是元,保留两位小数")
    private BigDecimal totalPrice;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


}